This section describes public resources that movie export components should implement.
A 'src#' resource may be associated with export components that implement MovieExportFromProceduresToDataRef . The resource is used to indicate the types of data sources the export component can support. Moreover, for each type, it also indicates the minimum and maximum number of data sources of that type. Clients can use this information to determine if the number of data sources they want to export can be handled directly by the exporter. If the data source type is supported by fewer sources are allowed, the client application must either export a fewer number of sources or combine the data from its candidate sources itself to meet the limitation imposed by the exporter.
This resource is of type QTMovieExportSourceRecord and consists of an array of QTMovieExpportSourceInfo records, each of which define a single data source type, minimum and maximum sources of that type, and flags for that entry. The C structure definitions are as follows:
enum {
kQTMovieExportSourceInfoResourceType = FOUR_CHAR_CODE('src#'),
kQTMovieExportSourceInfoIsMediaType = 1L << 0,
kQTMovieExportSourceInfoIsMediaCharacteristic = 1L << 1,
kQTMovieExportSourceInfoIsSourceType = 1L << 2
};
struct QTMovieExportSourceInfo {
OSType mediaType; /* Media type of source */
UInt16 minCount; /* min number of sources of this kind
required, zero if none required */
UInt16 maxCount; /* max number of sources of this kind
allowed, -1 if unlimited allowed */
long flags; /* reserved for flags */
};
typedef struct QTMovieExportSourceInfo QTMovieExportSourceInfo;
struct QTMovieExportSourceRecord {
long count; /* Number of entries in sourceArray array */
long reserved; /* Must be 0 */
QTMovieExportSourceInfo sourceArray[1];
};
typedef struct QTMovieExportSourceRecord QTMovieExportSourceRecord;
For the 'src#' resource, the mediaType field will typically be either 'vide' or 'soun' , corresponding to a data source. The flags field of the source info record should have the bit indicated by kQTMovieExportSourceInfoIsSourceType set.
If minCount equals maxCount then only that number of sources is allowed. So, if only one source of a type is allowed, both minCount and maxCount would have the value 1. In this case, exactly one source is required. Fewer or more sources aren't allowed.
If minCount has the value 0, then it's acceptable to not have any data sources of that type.
If maxCount has the value -1, then any number of data sources of that type is allowed.
QuickTimeComponents .r defines a set of Rez definitions for this resource type.
type 'src#' {
longint = $$CountOf(SourceArray);
longint = 0; /* reserved */
array SourceArray {
literal longint; /* Media type of source */
integer; /* min number of sources of this kind
required, zero if none required */
integer; /* max number of sources of this kind
allowed, -1 if unlimited allowed */
longint = 0; /* reserved for flags */
};
};
For example, if an export component supports between 0 and 2 'vide' data sources but exactly 1 audio source, the corresponding 'src#' resource would look like this:
resource 'src#' (1) {
'vide', 0, 2, isSourceType,
'soun', 1, 1, isSourceType
}
};
Whereas 'src#'(1) is meant to describe the number of data sources supported for use with MovieExportFromProceduresToDataRef , the 'src#'(2) resource is meant to indicate the number of tracks of the given types that can be exported using one of MovieExportToDataRef or MovieExportToFile . The resource is identical to the resource for data sources. The difference is that the flags will have one of two values:
Similarly, mediaType holds either a characteristic or media type.
| Previous | Chapter Contents | Chapter Top | Next |